﻿using System;
using EasyStep.Attributes;using EasyStep.TestExecution.Data;using EasyStep.TestExecution.Interfaces;

using OpenQA.Selenium;
using Microsoft.VisualStudio.TestTools.UnitTesting;


namespace EasyStep.TestActions.Actions
{
    [TestAction(typeof(AssertAction), Name = "ByLinkText", RequireData = false)]
    class AssertByLinkText : ITestAction<IWebDriver>
    {
        public void Execute(IWebDriver browser, TestStepResult data, IExecuteDataContext context)
        {
            Assert.IsTrue(browser.FindElement(By.LinkText(data.Locator)).Displayed);
        }
    }
}